'use strict';

var ctrl = angular.module('Controller',[]);

ctrl.controller('HomeCtrl',['$rootScope',function($rootScope){
         $rootScope.currentTab = 'find';
    }]
);

ctrl.controller('RadioCtrl',['$rootScope',function($rootScope){
        $rootScope.currentTab = 'radio';
    }]
);

ctrl.controller('FriendCtrl',['$rootScope',function($rootScope){
        $rootScope.currentTab = 'friend';
    }]
);

ctrl.controller('MineCtrl',['$rootScope',function($rootScope){
        $rootScope.currentTab = 'mine';
    }]
);

ctrl.controller('UserCtrl',['$scope','UserService',function($scope,UserService){
        $scope.data = null;
        $scope.userList = [];
            UserService.result().then(function (data) {
               $scope.data = data.data;
               if($scope.data.code == 1){
                   $scope.userList = $scope.data.list;
               }
            });
        }]
);
